import Vue from 'vue'
import VueRouter from 'vue-router'
// import middle from '../views/middle.vue'
import middle from '../views/middle.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: middle,
    children: [
      { path: '/', component: ()=>import("@/components/home") },
      { path: '/musiclist', component: ()=>import("@/components/musiclist/musiclist") },
      { path: '/RecommendedPlaylist', component: ()=>import("@/components/RecommendedPlaylist") }
     ]} ,
      {
      path: '/MusicDetails',
      component: ()=>import ("@/components/MusicDetails/details"),
      } ,
      {
      path: '/searchResult',
      component: ()=>import ("@/components/searchResult/result"),
      },
      {
      path: '/MyHome',
      component: ()=>import ("@/components/MyHome/MyHome"),
      } ,
      {
      path: '/video',
      component: ()=>import ("@/components/video/index")
    }, 
    {
      path: '/videodetails',
      component:()=>import ("@/components/video/videodetails/index"),
    } ,
    {
      path: '/Mvdetails',
      component:()=>import ("@/components/video/videodetails/Mvdetails"),
    } ,
    {
      path: '/singer',
      component:()=>import ("@/components/singer/singer"),
    } ,
    {
      path:'/singerDetail',
      component:()=>import ("@/components/singer/singerDetail/index"),
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
